<div class="fly-panel">
  <div class="fly-panel-title fly-filter">
    <a>{{.ArticleListData.title}}</a>
  </div>
  <ul class="fly-list">
  
    {{range .ArticleListData.list}}
    <li>
      <!--<a href="user/home.html" class="fly-avatar">
                <img src="https://tva1.sinaimg.cn/crop.0.0.118.118.180/5db11ff4gw1e77d3nqrv8j203b03cweg.jpg" alt="贤心">
              </a>-->
      <h2>
  
        <a href="/u/{{.Usernametag}}/content/{{.ID}}">{{.Title}}</a>
      </h2>
      <div class="fly-list-info">
        {{if .User_name}}
        <span><a href="/u/{{.Usernametag}}" title="进入{{.User_name}}的主页">{{.User_name}}</a></span>
        {{end}}
        
        <span title="{{.Update_time}}">{{TimeStrToRelativeTime .Update_time}}</span>
        <span>阅读：{{.Visit_times}}</span>
        {{range .Tags}}
        <span class="layui-badge fly-badge-accept layui-hide-xs blog-tags"><a
            href="/search/tag/{{.ID}}">{{.Name}}</a></span>
        {{end}}
  
      </div>
      {{if .Latest_html_label}}
      <div class="fly-list-badge">
        <span class="layui-badge layui-bg-red">最近</span>
      </div>
      {{end}}
    </li>
  
    {{else}}
    <div style="margin: 20px;">没有任何文章!</div>
    {{end}}
  
  
    
  </ul>
  <!-- 页码 -->
  <div id="page" style="margin-left:10px ;">
    
  </div>

  <!-- 爬虫页码 -->
  <div class="layui-hide">
    {{range .ArticleListData.countPageArr}}
    <a title="全部博客 第{{.Num}}页" href="{{$.ArticleListData.pageUrl}}{{.Num}}">进入第{{.Num}}页</a>
    {{end}}
  </div>
  
  <!-- <div style="text-align: center">
    <div class="laypage-main">
      <a href="/list.html" class="laypage-next">更多</a>
    </div>
  </div> -->

</div>
<!-- js -->
<script type="text/javascript">
  layui.use('laypage', function () {
    layui.laypage.render({
      elem: 'page'
      , count: "{{.ArticleListData.count}}" //数据总数，从服务端得到
      , curr: "{{.ArticleListData.currentPage}}"
      , limit	:"{{.ArticleListData.limit}}"
      , jump: function (obj, first) {
        //obj包含了当前分页的所有参数，比如：
        // console.log(obj.curr); //得到当前页，以便向服务端请求对应页的数据。
        // console.log(obj.limit); //得到每页显示的条数

        //首次不执行
        if (!first) {
          location.href = "{{.ArticleListData.pageUrl}}"+ obj.curr;
        }
      }
    });
  })
</script>